<template>
	<view class="successfully">
		<image src="https://hdsq.aoorange.cn/attachment/xcx/icon/ok.png" mode="widthFix"></image>
		<view class="ts">
			<text v-if="type=='activity' || type=='activity_join'">提交成功，请等待管理员审核</text>
			<text v-if="type=='activity'">审核结果可在“我发布的活动中”查看</text>
			<text v-if="type=='activity_join'">审核结果可在“我的”活动中查看</text>
			<text v-if="type=='withdraw'">提交成功，预计三个工作日内到账</text>
			<text v-if="type=='withdraw'">提现结果可在我的提现明细中查看</text>
			<text v-if="type=='order_pay'">支付成功</text>
			<text v-if="type=='order'">提交订单成功，但未支付</text>
			<text v-if="type=='order' || type=='order_pay'">可在“我的订单”中查看</text>
			<text v-if="type=='group_pay'">支付成功</text>
			<text v-if="type=='group'">兑换成功，但未支付</text>
			<text v-if="type=='group' || type=='group_pay'">可在“我的订单”中查看</text>
		</view>
		<view class="bot">
			<text v-if="type=='activity' || type=='activity_join'" @click="jump('activity_view', id)">返回活动页面</text>
			<text v-if="type=='activity'" @click="jump('public_activity_list')">查看我发布的活动</text>
			<text v-if="type=='activity_join'"  @click="jump('my_activity_list')">查看我的活动报名</text>
			<text v-if="type=='withdraw'" @click="jump('withdraw_list')">查看提现明细</text>
			<text v-if="type=='order' || type=='order_pay'" @click="jump('store_list')">返回商城页面</text>
			<text v-if="type=='order' || type=='order_pay'" @click="jump('order_view', id)">查看订单详情</text>
			<text v-if="type=='group' || type=='group_pay'" @click="jump('store_list')">返回商城页面</text>
			<text v-if="type=='group' || type=='group_pay'" @click="jump('order_view', id)">查看兑换详情</text>
		</view>
	</view>
</template>

<script>
	import common from '../../static/jump.js';
	export default {
		data() {
			return {
				type: '',
				id : 0,
			}
		},
		methods: {
			jump(jump_type, jump_link) {
				if(jump_type == "store") {
					uni.redirectTo({
					    url: '/pages/merchant/list'
					});
					return ;
				} else if(jump_type == 'order_view') {
					uni.redirectTo({
					    url: '/pages/my/orderDetails?id='+jump_link
					});
					return ;
				}
				common.jump(jump_type, jump_link);
			}
		},
		onLoad(options) {
			this.type = options.type || 'club';
			this.id = options.id || 0;
		},
		onPullDownRefresh() {
			console.log('refresh');
			setTimeout(function() {
				uni.stopPullDownRefresh(); //结束下拉加载状态
			}, 1000);
		}
	}
</script>

<style scoped lang="scss">
	.successfully{
		width: 100%;
		image{
			width:200rpx;
			height:204rpx;
			margin: 109rpx 275rpx 60rpx;
		}
		.ts{
			display: flex;
			justify-content: center;
			flex-direction: column;
			align-items: center;
			color: #999999;
			font-size: 32rpx;
			text:last-child{
				margin-top: 10rpx;
			}
		}
		.bot{
			box-sizing: border-box;
			padding: 167rpx 75rpx 0rpx;
			display: flex;
			flex-direction: column;
			text:nth-child(1){
				width:600rpx;
				height:100rpx;
				line-height: 100rpx;
				background:#FFBC00;
				font-size: 32rpx;
				color: #FFFFFF;
				text-align: center;
				border-radius:50rpx;
			}
			text:nth-child(2){
				width:600rpx;
				height:100rpx;
				line-height: 100rpx;
				background:#FFFFFF;
				font-size: 32rpx;
				color: #FFBC00;
				text-align: center;
				border-radius:50rpx;
				margin-top: 54rpx;
				border: 1rpx #FFBC00 solid;
			}
		}
	}
</style>
